package sf.dao;

import db.domain.User;
import sf.database.mapper.DaoMapper;

public interface UserDAO extends DaoMapper<User> {
    default User getUserByLoginName(String loginName) {
        User user = new User();
        user.useQuery().createCriteria().eq(User.Field.loginName, loginName);
        return getDbClient().selectOne(user);
    }

    default Integer defaultTest() {
        return 1;
    }
}
